<?php
require_once '../conn/DBconnect.php';
session_start();

	$params[0] = "TEMP_RECORD";
	$params[1] = "0";
 	$params[2] = "0";
 	$params[3] = $_POST["r_firstName"];
 	$params[4] = $_POST["r_lastName"];
 	$params[5] = $_POST["r_mi"];
 	$params[6] = "";
 	$params[7] = "";
 	$params[8] = "";
 	$params[9] = "";
 	$params[10] = "";
 	$params[11] = "";
 	$params[12] = "";
 	$params[13] = "";
 	$params[14] = "";
 	$params[15] = "";
 	$params[16] = "";
 	$params[17] = $_POST["r_size"];
 	$params[18] = $_POST["r_color"];
 	$params[19] = "0";
 	$params[20] = "0";
 	$params[21] = "0";
 	$params[22] = $_POST["r_category"];
 	$params[23] = "0";
 	$params[24] = $_SESSION["transID"];
 	
 	$insertPROC = "CALL SP_REGISTRATION('" . implode("', '", $params) . "');";
	$result = mysqli_query($mysqlLink, $insertPROC);
	$row = mysqli_fetch_array($result, MYSQLI_ASSOC);
	
	mysqli_free_result($result);
	mysqli_next_result($mysqlLink);
	
	echo $row["err_code"];
	